package com.workManager.mapper;

import com.workManager.pojo.TbSalary;
import com.workManager.pojo.TbSalaryExample;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.workManager.vo.ProjectSalaryTempVo;
import com.workManager.vo.ProjectSalaryVo;
import com.workManager.vo.SalarySpreadVo;
import com.workManager.vo.SalaryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface TbSalaryMapper {
    int countByExample(TbSalaryExample example);

    int deleteByExample(TbSalaryExample example);

    int deleteByPrimaryKey(Integer salaryId);

    int insert(TbSalary record);

    int insertSelective(TbSalary record);

    List<TbSalary> selectByExample(TbSalaryExample example);

    TbSalary selectByPrimaryKey(Integer salaryId);

    TbSalary selectByUserWithMonth(@Param("userId")Integer userId, @Param("salMonth")String salMonth);

    int updateByExampleSelective(@Param("record") TbSalary record, @Param("example") TbSalaryExample example);

    int updateByExample(@Param("record") TbSalary record, @Param("example") TbSalaryExample example);

    int updateByPrimaryKeySelective(TbSalary record);

    int updateByPrimaryKey(TbSalary record);

    List<SalaryVo> queryDetails(@Param("cm") Map<String, Object> queryParam);

    List<ProjectSalaryVo> countByProjectInMonth(@Param("cm") Map<String, Object> queryParam);

    List<ProjectSalaryTempVo> countByProjectInMonthTemp(@Param("cm")Map<String,Object> queryParam);

    List<SalarySpreadVo> salarySpreadInMonth(@Param("month") String month, @Param("projectId") String projectId, @Param("userId")String userId);

}